package com.mediacloud.app.newsmodule.fragment.baoliao.model.detail.video;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Yoake on 2018/8/29.
 */

public class Video implements Parcelable {
    private String poster;
    private String cdnConfigEncrypt;
    private List<VodAddress> vodAddress;
    private List<TsAddress> tsAddress;
    private List<Mp4Address> mp4Address;

    public String getPoster() {
        return poster;
    }

    public void setPoster(String poster) {
        this.poster = poster;
    }

    public String getCdnConfigEncrypt() {
        return cdnConfigEncrypt;
    }

    public void setCdnConfigEncrypt(String cdnConfigEncrypt) {
        this.cdnConfigEncrypt = cdnConfigEncrypt;
    }

    public List<VodAddress> getVodAddress() {
        return vodAddress;
    }

    public void setVodAddress(List<VodAddress> vodAddress) {
        this.vodAddress = vodAddress;
    }

    public List<TsAddress> getTsAddress() {
        return tsAddress;
    }

    public void setTsAddress(List<TsAddress> tsAddress) {
        this.tsAddress = tsAddress;
    }

    public List<Mp4Address> getMp4Address() {
        return mp4Address;
    }

    public void setMp4Address(List<Mp4Address> mp4Address) {
        this.mp4Address = mp4Address;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.poster);
        dest.writeString(this.cdnConfigEncrypt);
        dest.writeTypedList(this.vodAddress);
        dest.writeTypedList(this.tsAddress);
        dest.writeTypedList(this.mp4Address);
    }

    public Video() {
    }

    protected Video(Parcel in) {
        this.poster = in.readString();
        this.cdnConfigEncrypt = in.readString();
        this.vodAddress = in.createTypedArrayList(VodAddress.CREATOR);
        this.tsAddress = in.createTypedArrayList(TsAddress.CREATOR);
        this.mp4Address = in.createTypedArrayList(Mp4Address.CREATOR);
    }

    public static final Parcelable.Creator<Video> CREATOR = new Parcelable.Creator<Video>() {
        @Override
        public Video createFromParcel(Parcel source) {
            return new Video(source);
        }

        @Override
        public Video[] newArray(int size) {
            return new Video[size];
        }
    };
}